<?php

namespace app\common\model;

class WxGroup extends Base
{
    /**
     * get
     * @param $region_id
     * @throws
     */
    public function get($region_id)
    {
        // 查询条件
        $wheres = [
            // 精确配置
            [
                'region_id' => $region_id,
            ],
            // 默认配置
            [
                'region_id' => 0,
            ],
        ];

        // 循环查询
        foreach ($wheres as $where) {
            $row = $this->where($where)->find();
            if ($row) {
                return $row->toArray();
            }
        }
        return null;
    }
}